﻿<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <title>微街秀 > 登录</title>
    <link href="plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
    <link href="plugins/font-awesome-4.3.0/css/font-awesome.min.css" rel="stylesheet"
        type="text/css" />
    <link rel="stylesheet" type="text/css" href="css/css.css" />
    <link rel="stylesheet" type="text/css" href="css/base.css" />
    <link href="css/gl.css" rel="stylesheet" type="text/css" />
    <style>
        .one-key-txt
        {
            line-height: 41px;
        }
        
        .one-key-body
        {
        }
        
        .one-key-body .one-key-item
        {
            width: 60px;
            height: 60px;
            margin: 0 auto;
            border-radius: 30px;
            color: #FFF;
        }
        
        .one-key-body .one-key-item > i
        {
            line-height: 60px;
            font-size: 30px;
        }
        
        .one-key-body .qq-bg
        {
            background-color: #2C90CE;
        }
        .one-key-body .wechat-bg
        {
            background-color: #3AB737;
        }
    </style>
</head>
<body>
    <div>
        <div class="media top-nav-body">
            <div class="media-left" onclick="goBack();">
                <div class="top-left">
                    <i class="fa fa-angle-left"></i>
                </div>
            </div>
            <div class="media-body">
                <div class="top-title">
                    登录</div>
            </div>
            <div class="media-right">
                <div class="top-right">
                </div>
            </div>
        </div>
    </div>
    <form action="Ajax/User.ashx?Login" method="post">
    <div class="container-fluid mt40">
        <input name="login_type" type="hidden" value="4" />
        <input name="phone" type="number" placeholder="手机号" class="form-control mt40" mobile="true" />
        <div class="form-group has-feedback  mt10">
            <input id="pwd" name="pwd" type="password" placeholder="密码" class="form-control"
                require="true" tips="密码不能为空" />
            <div class="form-control-feedback gray" onclick="showPwd('#pwd',this)">
                <i class="fa fa-eye"></i>
            </div>
        </div>
        <div class="mt10">
            <div class="row">
                <div class="col-xs-6">
                    <h5>
                        <small id="reg" onclick="toUrl('regist.html')">立即注册</small>
                    </h5>
                </div>
                <div class="col-xs-6 text-right">
                    <h5>
                        <small onclick="toUrl('reset-pwd.html')">忘记密码</small>
                    </h5>
                </div>
            </div>
        </div>
        <button class="btn btn-normal btn-block mt30">
            登录</button>
        <div class="mt10">
            <div class="row">
                <div class="col-xs-6">
                    <h5>
                        <small onclick="toUrl('login-old.html')">其他方式登录</small>
                    </h5>
                </div>
                <div class="col-xs-6 text-right">
                </div>
            </div>
        </div>
        <div class="row mt40">
            <div class="col-xs-4">
                <hr />
            </div>
            <div class="col-xs-4 text-center lh40">
                一键登录</div>
            <div class="col-xs-4">
                <hr />
            </div>
        </div>
        <div class="row one-key-body">
            <div class="col-xs-6">
                <a href="/api/oauth/qqlogin.ashx?login">
                    <div class="one-key-item text-center qq-bg">
                        <i class="fa fa-qq"></i>
                    </div>
                </a>
            </div>
            <div class="col-xs-6 text-center" onclick="toUrl('/api/oauth/wxlogin.ashx?login');">
                <div class="one-key-item wechat-bg">
                    <i class="fa fa-wechat"></i>
                </div>
            </div>
        </div>
    </div>
    </form>
    <script src="js/jquery-2.1.4.min.js" type="text/javascript"></script>
    <script src="js/jquery-form.js" type="text/javascript"></script>
    <script src="plugins/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
    <script src="js/jquery-submit-1.1.js" type="text/javascript"></script>
    <script src="js/gl-dialog.js" type="text/javascript"></script>
    <script src="js/ajax-data.js"></script>
    <script src="js/base.js"></script>
    <script src="js/gl.js"></script>
    <script src="js/dialog.js" type="text/javascript"></script>
    <script>
        $(function () {
            Oauth();
            $('form').submit(function () {
                if (callSubmit(this)) {
                    ajaxSubmit({
                        callback: function (data) {
                            console.log(data);
                           GoPage(1, data.id, data.token, data.parent_id);
                        }
                    });
                }
                return false;
            });
        });
        function Oauth() {
            var action = getUrlArgStr("action");
            var token = getUrlArgStr("token");
            var userid = getUrlArgStr("user_id");
            var parentid = getUrlArgStr("parentid");
            var code = getUrlArgStr("code");
            if (code == "1005" || (action == "oauth" && userid == "")) {
                Alert("您的账户已停用");
                return false;
            }
            delCookie('a');
            delSession('a');
            if (action == "oauth" && token != "" && userid != "") {
                GoPage(2, userid, token, parentid);
                return true;
            }
            return false;
        }
    </script>
</body>
</html>
